package org.jeecg.modules.yc.web.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Builder;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 采集器
 * @Author: jeecg-boot
 * @Date:   2023-12-25
 * @Version: V1.0
 */
@Data
@TableName("terminal")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="terminal对象", description="采集器")
public class Terminal implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private java.lang.String id;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private java.lang.String sysOrgCode;
	/**设备编号*/
	@Excel(name = "NB设备ID", width = 15)
    @ApiModelProperty(value = "NB设备ID")
    private java.lang.String no;
	/**设备名称*/
	@Excel(name = "设备名称", width = 15)
    @ApiModelProperty(value = "设备名称")
    private java.lang.String name;
    /**设备名称*/
    @Excel(name = "设备位置", width = 15)
    @ApiModelProperty(value = "设备位置")
    private java.lang.String coordinate;
	/**通信状态*/
	@Excel(name = "通信状态", width = 15)
    @ApiModelProperty(value = "通信状态")
    @Dict(dicCode = "terminal_communication_status")
    private java.lang.String communicationStatus;
	/**NB通信信号强度*/
	@Excel(name = "NB通信信号强度", width = 15)
    @ApiModelProperty(value = "NB通信信号强度")
    private java.lang.String nbIotSign;
	/**电压强度*/
	@Excel(name = "电压强度", width = 15)
    @ApiModelProperty(value = "电压强度")
    private java.lang.String voltage;
	/**最后一次通信时间*/
	@Excel(name = "最后一次通信时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后一次通信时间")
    private java.util.Date lastConnectTime;
    /**NB产品ID*/
    @Excel(name = "NB产品ID", width = 15)
    @ApiModelProperty(value = "NB产品ID")
	private java.lang.String productId;
    /**NB租户ID*/
    @Excel(name = "NB租户ID", width = 15)
    @ApiModelProperty(value = "NB产品ID")
    private java.lang.String tenantId;
    /**NBimei号*/
    @Excel(name = "NB设备ID", width = 15)
    @ApiModelProperty(value = "NBimei号")
    private java.lang.String imei;

    /**温度*/
    @Excel(name = "温度", width = 15)
    @ApiModelProperty(value = "温度")
    private java.lang.String temperature;
    /**湿度*/
    @Excel(name = "湿度", width = 15)
    @ApiModelProperty(value = "湿度")
    private java.lang.String humidity;

    private Integer deviceNum;

    public static Terminal.TerminalBuilder builder() {
        return new Terminal.TerminalBuilder();
    }
    public static class TerminalBuilder {
        private Terminal terminal;

        TerminalBuilder() {
            terminal = new Terminal();
        }

        public Terminal.TerminalBuilder id(final String id) {
            terminal.setId(id);
            return this;
        }

        public Terminal.TerminalBuilder communicationStatus(final String communicationStatus) {
            terminal.setCommunicationStatus( communicationStatus);
            return this;
        }
        public Terminal.TerminalBuilder voltage(final String voltage) {
            terminal.setVoltage(voltage);
            return this;
        }

        @JsonFormat(
                timezone = "GMT+8",
                pattern = "yyyy-MM-dd HH:mm:ss"
        )
        public Terminal.TerminalBuilder lastConnectTime(final Date lastConnectTime) {
            terminal.setLastConnectTime (lastConnectTime);
            return this;
        }
        public Terminal.TerminalBuilder createBy(final String createBy) {
            terminal.setCreateBy (createBy);
            return this;
        }
        public Terminal.TerminalBuilder createTime(final Date createTime){
            terminal.setCreateTime(createTime);
            return this;
        }
        public Terminal.TerminalBuilder sysOrgCode(final String sysOrgCode){
            terminal.setSysOrgCode(sysOrgCode);
            return this;
        }
        public Terminal.TerminalBuilder no(final String no){
            terminal.setNo(no);
            return this;
        }

        public Terminal.TerminalBuilder name(final  String name){
            terminal.setName(name);
            return this;
        }
        public Terminal.TerminalBuilder productId(final  String productId){
            terminal.setProductId(productId);
            return this;
        }
        public Terminal.TerminalBuilder tenantId(final  String tenantId){
            terminal.setTenantId(tenantId);
            return this;
        }
        public Terminal.TerminalBuilder imei(final String imei){
            terminal.setImei(imei);
            return this;
        }

        public Terminal build() {
            return terminal;
        }
    }
}
